-- experiment with getfenv()
function f(...)
	local x = getfenv(2)
	local maxkeylen = 0

	for k, v in pairs(x) do
		if maxkeylen < #k then
			maxkeylen = #k
		end
	end
	for k, v in pairs(x) do
		local spaces = ''
		for i = #k, maxkeylen do spaces = spaces .. ' ' end
		print(k .. spaces .. tostring(v))
	end
end

f('a', 'b')
--f('x', 1.23, 3.45)
